package com.woniuxy.dao;

import com.woniuxy.entity.AddQuestionEntity;
import com.woniuxy.entity.QuestionTopic;
import org.apache.ibatis.annotations.Mapper;


import java.util.List;
import java.util.Map;

@Mapper
public interface QuestionTopicMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(QuestionTopic questionTopic);
    int insertq(QuestionTopic questionTopic);

    QuestionTopic selectByPrimaryKey(Integer id);

    List<QuestionTopic> selectAll();

    int updateByPrimaryKey(QuestionTopic row);

    List<QuestionTopic> findTopicByInvenId(Integer iid);

    //加载所有题目
    List<QuestionTopic> findAllQ(Map map);

    //按照Topic-id删除题目
    int deleteQById(Integer tid);

    //查询单选题目与选项
    List<QuestionTopic> findQbyid(Integer id);

    //查询阅读题目与选项
    List<QuestionTopic> findQubyid(Integer id);

    Integer insertUseIfStatement(QuestionTopic questionTopic);

    String findTextById(Integer id);

    Integer getMaxTeid();
}